﻿using System;
using System.Web.UI.WebControls;

namespace NotAClue.ComponentModel.DataAnnotations
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class GroupAttribute : Attribute
    {
        public int Index { get; set; }

        internal static GroupAttribute Default = new GroupAttribute();
        public GroupAttribute() : this(0) { }

        public GroupAttribute(int position)
        {
            Index = position;
        }

        #region IComparable<FilterAttribute> Members
        public int CompareTo(GroupAttribute other)
        {
            return Index - other.Index;
        }
        #endregion
    }
}